//
//  YDBBannerConfig.swift
//  BaseFramework
//
//  Created by 杨东宝 on 2020/5/8.
//  Copyright © 2020 杨东宝. All rights reserved.
//

import Foundation
import Kingfisher

let BannerWidth = UIScreen.main.bounds.size.width
let BannerHeight = UIScreen.main.bounds.size.height

// 通过 十六进制与alpha来设置颜色值（ 样式：0xff00ff ）
public let BannerColor:((Int) -> UIColor) = { (rgbValue:Int) -> UIColor in
    return UIColor(red: CGFloat(CGFloat((rgbValue & 0xFF0000) >> 16)/255), green: CGFloat(CGFloat((rgbValue & 0xFF00) >> 8)/255), blue: CGFloat(CGFloat(rgbValue & 0xFF)/255), alpha: 1.0)
}

//MARK:-cell的block
typealias BannerCellCallBlock = (_ indexPath:IndexPath,_ collectionView:UICollectionView,_ model:Any,_ bgImageView:UIImageView,_ dataArr:Array<Any>) ->UICollectionViewCell
//MARK:-点击
typealias BannerClickBlock = (anyId:Any,index:Int)
//MARK:-自定义pageControl
typealias BannerPageControl = (_ pageControl:UIPageControl)
->Void
//MARK:-点击 ,可获取居中cell
typealias BannerCenterClickBlock = (anyID:Any,index:Int,isCenter:Bool,cell:UICollectionViewCell)

//MARK:-滚动结束
typealias BannerScrollEndBlock = (anyID:Any,index:Int,isCenter:Bool,cell:UICollectionViewCell)

//MARK:-cell动画的位置
enum BannerCellPosition:Int{
    case BannerCellPositionCenter //居中 默认
    case BannerCellPositionBottom //置底
}

//MARK:-pageControl的位置
enum BannerControlPosition:Int{
    case BannerControlCenter //居中 默认
    case BannerControlLeft //左下
    case BannerControlRight //右下
}
